]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
data: Lower down gnome-shell process' OOM score
authorJian-Hong Pan <jhp@endlessos.org>
Mon, 12 Dec 2022 07:21:23 +0000 (15:21 +0800)
committerJian-Hong Pan <jhp@endlessos.org>
Tue, 13 Dec 2022 05:12:09 +0000 (13:12 +0800)
When GNOME shell runs on a less memory system (for example 3 GB RAM), it
is usually killed by the kernel OOM-killer easily. Because, it has a
higher OOM score. However, GNOME desktop environment cannot do anything
when the GNOME shell is killed.

This commit adjusts and lowers down gnome-shell process' OOM score to
avoid being killed by the kernel OOM-killer too early. In other words,
sacrifices other processes first.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2582>

data/org.gnome.Shell@wayland.service.in
data/org.gnome.Shell@x11.service.in

index 38887eb193a1d7d62cce9c24ec7a2ef484ef4950..76d5ccb1b4e93d8f2630d00d1c86b83ebf4193b4 100644 (file)
@@ -32,3 +32,6 @@ ExecStopPost=-/bin/sh -c 'test "$SERVICE_RESULT" != "exec-condition" && systemct
 Restart=no
 # Kill any stubborn child processes after this long
 TimeoutStopSec=5
+
+# Lower down gnome-shell's OOM score to avoid being killed by OOM-killer too early
+OOMScoreAdjust=-1000
index 7310f66081cfee41967baba43bb26ffe48d0742a..078d87a3c93e5c2b5d7d537a48cdffc56d83ae70 100644 (file)
@@ -37,3 +37,6 @@ Restart=always
 RestartSec=0ms
 # Kill any stubborn child processes after this long
 TimeoutStopSec=5
+
+# Lower down gnome-shell's OOM score to avoid being killed by OOM-killer too early
+OOMScoreAdjust=-1000